<script type="text/javascript">
	//List Configuration
	$j("#list_sport").jqGrid({
		url:'activity/list',
		datatype:'json',
		mtype:'POST',
		colNames:['Nombre', 'Descripcion'],
		colModel:[
		          {name:'sport_name', index:'sport_name', width:50, editable: true},
		          {name:'description', index:'description', width:80, editable: true}
		],
		pager:'#gridpager_sport',
		loadtext: 'Cargando Actividades...',
		rowNum:10,
		rowList:[10],
		sortname:'sport_name',
		sortorder:'asc',
		autowidth:true,
		viewrecords:true,
		onSelectRow:function(id){},
		editurl:'activity/save',
		scrollOffset:0
		//caption:'Actividades'
	});

	$j("#list_sport").setGridHeight(220);
	
	//Form editing
	$j("#list_sport").jqGrid('navGrid','#gridpager_sport',{
			edit:true,
			add:true,
			del:true,
			search:true},
			{
				closeAfterEdit:true,
				editCaption: "Modificar Actividad"
			},
			{
				closeAfterAdd:true,
				addCaption: "Nueva Actividad"
			},
			{
				msg: "¿Desea eliminar la actividad seleccionada?",
				caption: "Eliminar Actividad",
				width:300
			},
			{
				sopt:['eq','bw','ew','cn']
			});
</script>